<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<style>
.state option{
	width:50px;
} 
.sysMenu-add{
	padding: 10px 0px 0px 75px;
	width: 275px;
}
.sysMenu-update{
	padding: 10px 0px 0px 75px;
	width: 275px;	
}
</style>
<div id="sysMenuTreegrid" style="width:100%;"></div>
<div id="sysMenuToolbar">
	<div>
		<a href="#" class="easyui-linkbutton" onclick="sysMenu.toolbar.showAddDialog();" data-options="
		iconCls:'icon-add',
		plain:true">
			新增
		</a>
		<a href="#" class="easyui-linkbutton" onclick="sysMenu.toolbar.showUpdateDialog();" data-options="
		iconCls:'icon-edit',
		plain:true">
			修改
		</a>
		<a href="#" class="easyui-linkbutton" onclick="sysMenu.toolbar.updateState();" data-options="
		iconCls:'icon-lock',
		plain:true">
			设置失效
		</a>
		<a href="#" class="easyui-linkbutton" onclick="sysMenu.toolbar.redo();" data-options="
		iconCls:'icon-redo',
		plain:true">
			取消
		</a>
	</div>
</div>

<div id="sysMenuAddDialog" class="easyui-dialog sysMenu-add" data-options="
title:'新增菜单',
buttons:'#sysMenuAddButtons',
closed: true,
onClose:sysMenu.toolbar.resetAddFrom">
	<form id="sysMenuAddFrom" method="post">
		<input type="hidden" name="id"/>
		<p>
			<strong>父级菜单：</strong>
			<input type="text" name="ptext" class="easyui-textbox" data-options="
			required:true" readonly="readonly">
		</p>
		<p>
			<strong>菜单名称：</strong>
			<input type="text" name="text" id="text" class="easyui-textbox" data-options="
			required:true,
			validType:['minLength[2]','remote[\'<%=request.getContextPath() %>/SysMenuServlet?command=checkTextSystem\', \'text\']'],
					invalidMessage: '该菜单名称已存在'">
		</p>
		<p>
			<strong>菜单链接：</strong>
			<input type="text" name="url" class="easyui-textbox" data-options="">
		</p>
		<p>
			<strong>菜单顺序：</strong>
			<input class="easyui-numberspinner" value="5" data-options="increment:1" style="width:120px;" name="sort"></input>
		</p>
		<p>
			<strong>菜单状态：</strong>
			<select class="easyui-combobox state" name="state">
			    <option value="1">open</option>
			    <option value="2">closed</option>
			    <option value="3">失效</option>
			</select>
		</p>
		<p>
			<strong>菜单备注：</strong>
			<input class="easyui-textbox" type="text" id="memo">
		</p>
	</form>
</div>
<div id="sysMenuAddButtons">
	<a href="#" onclick="sysMenu.toolbar.add()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-add',
	plain: true">
		新增
	</a>
	<a href="#" onclick="sysMenu.toolbar.hiddenAddDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>


<div id="sysMenuUpdateDialog" class="easyui-dialog sysMenu-update" data-options="
title:'修改菜单',
buttons:'#sysMenuUpdateButtons',
closed: true,
onClose:sysMenu.toolbar.resetUpdateForm">
	<form id="sysMenuUpdateFrom" method="post">
		<input type="hidden" name="id"/>
		<p>
			<strong>父级菜单：</strong>
			<input type="text" name="ptext" class="easyui-textbox" data-options="
			required:true" readonly="readonly">
		</p>
		<p>
			<strong>菜单名称：</strong>
			<input type="text" name="text" id="updateText" class="easyui-textbox" data-options="
			required:true">
		</p>
		<p>
			<strong>菜单链接：</strong>
			<input type="text" name="url" class="easyui-textbox" data-options="">
		</p>
		<p>
			<strong>菜单顺序：</strong>
			<input class="easyui-numberspinner" value="5" data-options="increment:1" style="width:120px;" name="sort"></input>
		</p>
		<p>
			<strong>菜单状态：</strong>
			<select class="easyui-combobox state" name="state">
			    <option value="1">open</option>
			    <option value="2">closed</option>
			    <option value="3">失效</option>
			</select>
		</p>
		<p>
			<strong>菜单备注：</strong>
			<input class="easyui-textbox" type="text" name="memo">
		</p>
	</form>
</div>
<div id="sysMenuUpdateButtons">
	<a href="#" onclick="sysMenu.toolbar.update()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-add',
	plain: true">
		修改
	</a>
	<a href="#" onclick="sysMenu.toolbar.hiddenUpdateDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>


<script>
window.ctx = "<%=request.getContextPath() %>"
</script>
<script src="<%=request.getContextPath() %>/static/system/js/sysMenu.js"></script>
<script src="<%=request.getContextPath() %>/static/common/js/common.js"></script>
